package com.ocean.workOrder.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ocean.common.annotation.Excel;
import com.ocean.common.core.domain.BaseEntity;
import com.ocean.common.core.domain.entity.SysDept;
import com.ocean.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 任务单管理对象 o_work_order
 *
 * @author ocean
 * @date 2023-02-14
 */
public class OWorkOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    private String id;

    /**
     * 创建人名称
     */
    @Excel(name = "创建人名称")
    private String createName;

    /**
     * 创建日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /**
     * 更新人名称
     */
    @Excel(name = "更新人名称")
    private String updateName;

    /**
     * 更新日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateDate;

    /**
     * 任务编号
     */
    @Excel(name = "任务编号")
    private String workCode;

    /**
     * 任务开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date beginDate;

    /**
     * 任务结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /**
     * 存储个人UserID
     */
    @Excel(name = "存储个人UserID")
    private String organization;

    /**
     * 产品
     */
    @Excel(name = "产品")
    private String productId;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;

    /**
     * 类型
     */
    @Excel(name = "类型")
    private String workType;

    /**
     * 组织机构id
     */
    @Excel(name = "组织机构id")
    private String departId;

    private String productName;
    private SysDept dept;

    @JsonFormat(pattern = "yyyy-MM-dd MMHH:ss")
    private Date dqsj;

    private OWorkOrdernccj oWorkOrdernccj;

    public OWorkOrdernccj getoWorkOrdernccj() {
        return oWorkOrdernccj;
    }

    public void setoWorkOrdernccj(OWorkOrdernccj oWorkOrdernccj) {
        this.oWorkOrdernccj = oWorkOrdernccj;
    }

    public Date getDqsj() {
        return dqsj;
    }

    public void setDqsj(Date dqsj) {
        this.dqsj = dqsj;
    }

    private List<OWorkOrderItem> workOrderItemList;

    public List<OWorkOrderItem> getWorkOrderItemList() {
        return workOrderItemList;
    }

    public void setWorkOrderItemList(List<OWorkOrderItem> workOrderItemList) {
        this.workOrderItemList = workOrderItemList;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public SysDept getDept() {
        return dept;
    }

    public void setDept(SysDept dept) {
        this.dept = dept;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    @Override
    public String getCreateName() {
        return createName;
    }

    public OWorkOrder setCreateDate(Date createDate) {
        this.createDate = createDate;
        return this;
    }

    public Date getCreateDate() {
        return createDate;
    }

    @Override
    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }

    @Override
    public String getUpdateName() {
        return updateName;
    }

    public OWorkOrder setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
        return this;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public OWorkOrder setWorkCode(String workCode) {
        this.workCode = workCode;
        return this;
    }

    public String getWorkCode() {
        return workCode;
    }

    public OWorkOrder setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
        return this;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public OWorkOrder setEndDate(Date endDate) {
        this.endDate = endDate;
        return this;
    }

    public Date getEndDate() {
        return endDate;
    }

    public OWorkOrder setOrganization(String organization) {
        this.organization = organization;
        return this;
    }

    public String getOrganization() {
        return organization;
    }

    public OWorkOrder setProductId(String productId) {
        this.productId = productId;
        return this;
    }

    public String getProductId() {
        return productId;
    }

    public OWorkOrder setStatus(String status) {
        this.status = status;
        return this;
    }

    public String getStatus() {
        return status;
    }

    public OWorkOrder setWorkType(String workType) {
        this.workType = workType;
        return this;
    }

    public String getWorkType() {
        return workType;
    }

    public OWorkOrder setDepartId(String departId) {
        this.departId = departId;
        return this;
    }

    public String getDepartId() {
        return departId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("createName", getCreateName())
                .append("createBy", getCreateBy())
                .append("createDate", getCreateDate())
                .append("updateName", getUpdateName())
                .append("updateBy", getUpdateBy())
                .append("updateDate", getUpdateDate())
                .append("workCode", getWorkCode())
                .append("beginDate", getBeginDate())
                .append("endDate", getEndDate())
                .append("organization", getOrganization())
                .append("productId", getProductId())
                .append("status", getStatus())
                .append("workType", getWorkType())
                .append("departId", getDepartId())
                .toString();
    }
}
